tooltip: Get the pointer position relative to the toplevel widget
authorTimm Bäder <mail@baedert.org>
Sun, 3 Feb 2019 06:04:39 +0000 (07:04 +0100)
committerTimm Bäder <mail@baedert.org>
Mon, 4 Feb 2019 16:05:30 +0000 (17:05 +0100)
commit257df1d8b57f6a5e5c38d55b6c8a75d063818f13
tree1047665e82bcbdd778fd9f0876008079525fec2a
parent47ba423eca27be751a8fb9a3ad2f73fb483b67e6
tooltip: Get the pointer position relative to the toplevel widget

Since we position the tooltip window relative to the toplevel widget and
not actually relative to the effective_toplevel, we shouldn't get the
pointer position relative to the effective_toplevel.

We previously used the pointer position (relative to the
effective_toplevel) and the anchor rect (relative to the toplevel
widget) together to calculate x_distance. This leads to wrong values in
cases where get_surface (new_tooltip_widget) != get_surface (toplevel)

Fixes #1427 in master
gtk/gtktooltip.c